package morfo.jgen;

import java.util.Vector;

/**
 * 
 * @author Petri Uusitalo 2007
 *
 */
public class Suffix {

	private String name = null; // esim. singular_ablative
	private String suffix = null; // esim. ltA
	private final Vector<String> types = new Vector<String>(); //For example ["Sg","Ill"]

	public Suffix(final String name, final String suffix) {
		this.name = name;
		this.suffix = suffix;
	}

	public void addType(final String s) {
		types.add(s);
	}

	public String getName() {
		return name;
	}

	public String getSuffix() {
		return suffix;
	}

	public Vector<String> getTypes() {
		return types;
	}


	@Override
	public String toString() {

		final StringBuffer b = new StringBuffer();
		b.append(name);
		b.append(",");
		b.append(suffix);

		for (int i = 0; i < types.size(); i++) {
			final String s = types.get(i);
			b.append(",");
			b.append(s);
		}

		return b.toString();
	}
}
